package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/5/6.
 */
@HttpInlet(Net.GET_EVALUATEADD)
public class GetComment extends ZJDBAsyGet<Object> {
    public String userid,orderid,content;
    public int star;

    public GetComment(String userid,String orderid,String content,int star,AsyCallBack listener) {
        super(listener);
        this.userid = userid;
        this.orderid = orderid;
        this.content = content;
        this.star = star;
    }

    @Override
    protected Object parser(JSONObject object) {
        if (object.optInt("message") == 0) {
            TOAST = "评价失败";
            return "0";
        }else if(object.optInt("message") == 1){
            TOAST = "评价成功";
            return "1";
        }
        return null;
    }
}
